import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let localCityName = '北京';
localCityName = localStorage.city;

const state ={
  city:localCityName
}

const mutations ={
  changeCity(state,cityName){
    state.city=cityName;
    localStorage.city = cityName;
  }
}

export default  new Vuex.Store({

    state,
    mutations
})
